<template>
  <div>vuex-store: {{ count }}</div>
</template>

<script>
export default {
  name: "VuexDemo",
  data() {
    return {
      childCount: 0
    };
  },
  computed: {
    count() {
        console.log(this.$store.state.user.username);
      return this.$store.state.user.count;
    }
  }
  // computed: {
  //     count(){
  //         return this.$store.state.count;
  //     }
  // }
};
</script>
